import { createApp } from 'vue'
import './style.css'
import ElementPlus from 'element-plus'

// 开发环境下启用mock
// if (import.meta.env.DEV) {
//   import('./mock')
// }
import 'element-plus/dist/index.css'
import {router} from './router'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import store from './store'


import App from './App.vue'

const app = createApp(App)
app.use(store)
app.use(router)
app.use(ElementPlus)

for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
}

// windi.css 样式引入
import 'virtual:windi.css'
// 权限处理相关库引入
import './permission'
// 全局进度条的样式引入
import 'nprogress/nprogress.css'

import permission from './directives/permission'
app.use(permission)

app.mount('#app')
